function refresh() {
	var $request = $.ajax({
		url : "refresh.html",
		type : "post",
	});
	$request.done(function(response, textStatus, xhr) {
		if (response.indexOf("plateauJeu") == -1) {
			setTimeout(refresh, 2000);
		}
		$('#result').html(response);
	});
	$request.fail(function(xhr, textStatus, errorThrown) {
		alert(errorThrown);
	});
}

$(function() {
	refresh();
});